<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: flow::util::Basic_blob&lt; Allocator, S_SHARING_ALLOWED &gt;::Deleter_raw Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceflow.html">flow</a></li><li class="navelem"><a class="el" href="namespaceflow_1_1util.html">util</a></li><li class="navelem"><a class="el" href="classflow_1_1util_1_1Basic__blob.html">Basic_blob</a></li><li class="navelem"><a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html">Deleter_raw</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">flow::util::Basic_blob&lt; Allocator, S_SHARING_ALLOWED &gt;::Deleter_raw Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Internal deleter functor used if and only if <a class="el" href="classflow_1_1util_1_1Basic__blob.html#ab79d366c55643022eaf9e0d7378165d7" title="true if Allocator_raw underlying allocator template is simply std::allocator; false otherwise.">S_IS_VANILLA_ALLOC</a> is <code>false</code> and therefore only with <a class="el" href="classflow_1_1util_1_1Basic__blob.html#a30fe0a61f8b83e7588bdc4a88dbaabae" title="The smart-pointer type used for m_buf_ptr; a custom-allocator-and-SHM-friendly impl and parameterizat...">Buf_ptr</a> being <code>boost::interprocess::shared_ptr</code> or deleter-parameterized <code>unique_ptr</code>.  
 <a href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for flow::util::Basic_blob&lt; Allocator, S_SHARING_ALLOWED &gt;::Deleter_raw:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw__coll__graph.svg" width="219" height="155"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ad45a273758a0fc0bd81ab36edc9d8217"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#ad45a273758a0fc0bd81ab36edc9d8217">Pointer_raw</a> = typename std::allocator_traits&lt; <a class="el" href="classflow_1_1util_1_1Basic__blob.html#ae2089286c63766445b3bf40422eb17db">Allocator_raw</a> &gt;<a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a0152dc5043d6375124456f71d961988c">::pointer</a></td></tr>
<tr class="memdesc:ad45a273758a0fc0bd81ab36edc9d8217"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for the allocator's pointer type, pointing to <a class="el" href="classflow_1_1util_1_1Basic__blob.html#aeb9b64885b78263048d406ec34907ecf" title="Short-hand for values, which in this case are unsigned bytes.">Basic_blob::value_type</a>.  <a href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#ad45a273758a0fc0bd81ab36edc9d8217">More...</a><br /></td></tr>
<tr class="separator:ad45a273758a0fc0bd81ab36edc9d8217"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0152dc5043d6375124456f71d961988c"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a0152dc5043d6375124456f71d961988c">pointer</a> = <a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#ad45a273758a0fc0bd81ab36edc9d8217">Pointer_raw</a></td></tr>
<tr class="memdesc:a0152dc5043d6375124456f71d961988c"><td class="mdescLeft">&#160;</td><td class="mdescRight">For <code>boost::interprocess::shared_ptr</code> and <code>unique_ptr</code> compliance (hence the irregular capitalization).  <a href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a0152dc5043d6375124456f71d961988c">More...</a><br /></td></tr>
<tr class="separator:a0152dc5043d6375124456f71d961988c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a145ea5595e461bd93bd6e585a67516e6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a145ea5595e461bd93bd6e585a67516e6">Deleter_raw</a> ()</td></tr>
<tr class="memdesc:a145ea5595e461bd93bd6e585a67516e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default ctor: Must never be invoked; suitable only for a null smart-pointer.  <a href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a145ea5595e461bd93bd6e585a67516e6">More...</a><br /></td></tr>
<tr class="separator:a145ea5595e461bd93bd6e585a67516e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40b06c7484a925fe7550a3437a0ad194"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a40b06c7484a925fe7550a3437a0ad194">Deleter_raw</a> (const <a class="el" href="classflow_1_1util_1_1Basic__blob.html#ae2089286c63766445b3bf40422eb17db">Allocator_raw</a> &amp;alloc_raw, <a class="el" href="classflow_1_1util_1_1Basic__blob.html#af9b27f4b460a0fa8a9c9638174a9433a">size_type</a> buf_sz)</td></tr>
<tr class="memdesc:a40b06c7484a925fe7550a3437a0ad194"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs deleter by memorizing the allocator (of zero size if <a class="el" href="classflow_1_1util_1_1Basic__blob.html#ae2089286c63766445b3bf40422eb17db" title="Short-hand for the allocator type specified at compile-time. Its element type is our value_type.">Allocator_raw</a> is stateless, usually) used to allocate whatever shall be passed-to <code><a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a83887b57f8a78c0224fd7563210e94ec" title="Deallocates using Allocator_raw::deallocate(), passing-in the supplied pointer (to value_type) to_del...">operator()()</a></code>; and the size (in # of <code>value_type</code>s) of the buffer allocated there.  <a href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a40b06c7484a925fe7550a3437a0ad194">More...</a><br /></td></tr>
<tr class="separator:a40b06c7484a925fe7550a3437a0ad194"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83887b57f8a78c0224fd7563210e94ec"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a83887b57f8a78c0224fd7563210e94ec">operator()</a> (<a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#ad45a273758a0fc0bd81ab36edc9d8217">Pointer_raw</a> to_delete)</td></tr>
<tr class="memdesc:a83887b57f8a78c0224fd7563210e94ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deallocates using <code>Allocator_raw::deallocate()</code>, passing-in the supplied pointer (to <code>value_type</code>) <code>to_delete</code> and the number of <code>value_type</code>s to delete (from ctor).  <a href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a83887b57f8a78c0224fd7563210e94ec">More...</a><br /></td></tr>
<tr class="separator:a83887b57f8a78c0224fd7563210e94ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a2b946cc7c51563ef74d1d47ebfad53c2"><td class="memItemLeft" align="right" valign="top">std::optional&lt; <a class="el" href="classflow_1_1util_1_1Basic__blob.html#ae2089286c63766445b3bf40422eb17db">Allocator_raw</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a2b946cc7c51563ef74d1d47ebfad53c2">m_alloc_raw</a></td></tr>
<tr class="memdesc:a2b946cc7c51563ef74d1d47ebfad53c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">See ctor: the allocator that <code><a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a83887b57f8a78c0224fd7563210e94ec" title="Deallocates using Allocator_raw::deallocate(), passing-in the supplied pointer (to value_type) to_del...">operator()()</a></code> shall use to deallocate.  <a href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a2b946cc7c51563ef74d1d47ebfad53c2">More...</a><br /></td></tr>
<tr class="separator:a2b946cc7c51563ef74d1d47ebfad53c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2483f07aa6cf4ddb96309c4aa2eec00d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1util_1_1Basic__blob.html#af9b27f4b460a0fa8a9c9638174a9433a">size_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a2483f07aa6cf4ddb96309c4aa2eec00d">m_buf_sz</a></td></tr>
<tr class="memdesc:a2483f07aa6cf4ddb96309c4aa2eec00d"><td class="mdescLeft">&#160;</td><td class="mdescRight">See ctor and <a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a83887b57f8a78c0224fd7563210e94ec" title="Deallocates using Allocator_raw::deallocate(), passing-in the supplied pointer (to value_type) to_del...">operator()()</a>: the size of the buffer to deallocate.  <a href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a2483f07aa6cf4ddb96309c4aa2eec00d">More...</a><br /></td></tr>
<tr class="separator:a2483f07aa6cf4ddb96309c4aa2eec00d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;typename Allocator, <a class="el" href="classbool.html">bool</a> S_SHARING_ALLOWED&gt;<br />
class flow::util::Basic_blob&lt; Allocator, S_SHARING_ALLOWED &gt;::Deleter_raw</div><p >Internal deleter functor used if and only if <a class="el" href="classflow_1_1util_1_1Basic__blob.html#ab79d366c55643022eaf9e0d7378165d7" title="true if Allocator_raw underlying allocator template is simply std::allocator; false otherwise.">S_IS_VANILLA_ALLOC</a> is <code>false</code> and therefore only with <a class="el" href="classflow_1_1util_1_1Basic__blob.html#a30fe0a61f8b83e7588bdc4a88dbaabae" title="The smart-pointer type used for m_buf_ptr; a custom-allocator-and-SHM-friendly impl and parameterizat...">Buf_ptr</a> being <code>boost::interprocess::shared_ptr</code> or deleter-parameterized <code>unique_ptr</code>. </p>
<p >Basically its task is to undo the <code>m_alloc_raw.allocate()</code> call made when allocating a buffer in <a class="el" href="classflow_1_1util_1_1Basic__blob.html#aaa7bc2f80b4e46a18f04911954e2b3e7" title="Ensures that an internal buffer of at least capacity elements is allocated and owned; disallows growi...">reserve()</a>; the result of that call is passed-to <code>shared_ptr::reset()</code> or <code>unique_ptr::reset()</code>; as is <a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a2b946cc7c51563ef74d1d47ebfad53c2" title="See ctor: the allocator that operator()() shall use to deallocate.">m_alloc_raw</a> (for any aux allocation needed, but only for <code>shared_ptr</code> &ndash; <code>unique_ptr</code> needs no aux data); as is an instance of this <a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html" title="Internal deleter functor used if and only if S_IS_VANILLA_ALLOC is false and therefore only with Buf_...">Deleter_raw</a> (to specifically dealloc the buffer when the ref-count reaches 0). (In the <code>unique_ptr</code> case there is no ref-count per se; or one can think of it as a ref-count that equals 1.)</p>
<p >Note that <a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html" title="Internal deleter functor used if and only if S_IS_VANILLA_ALLOC is false and therefore only with Buf_...">Deleter_raw</a> is used only to dealloc the buffer actually controlled by the <code>shared_ptr</code> group or <code>unique_ptr</code>. <code>shared_ptr</code> will use the <a class="el" href="classflow_1_1util_1_1Basic__blob.html#ae2089286c63766445b3bf40422eb17db" title="Short-hand for the allocator type specified at compile-time. Its element type is our value_type.">Allocator_raw</a> directly to dealloc aux data. (We guess <a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html" title="Internal deleter functor used if and only if S_IS_VANILLA_ALLOC is false and therefore only with Buf_...">Deleter_raw</a> is a separate argument to <code>shared_ptr</code> to support array deletion; <code>boost::interprocess:shared_ptr</code> does not provide built-in support for <code>U[]</code> as the pointee type; but the deleter can do whatever it wants/needs.)</p>
<p >Note: this is not used except with custom <a class="el" href="classflow_1_1util_1_1Basic__blob.html#ae2089286c63766445b3bf40422eb17db" title="Short-hand for the allocator type specified at compile-time. Its element type is our value_type.">Allocator_raw</a>. With <code>std::allocator</code> the usual default <code>delete[]</code> behavior is fine. </p>

<p class="definition">Definition at line <a class="el" href="basic__blob_8hpp_source.html#l01165">1165</a> of file <a class="el" href="basic__blob_8hpp_source.html">basic_blob.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a0152dc5043d6375124456f71d961988c" name="a0152dc5043d6375124456f71d961988c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0152dc5043d6375124456f71d961988c">&#9670;&nbsp;</a></span>pointer</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Allocator , <a class="el" href="classbool.html">bool</a> S_SHARING_ALLOWED&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classflow_1_1util_1_1Basic__blob.html">flow::util::Basic_blob</a>&lt; Allocator, S_SHARING_ALLOWED &gt;::Deleter_raw::pointer =  <a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#ad45a273758a0fc0bd81ab36edc9d8217">Pointer_raw</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>For <code>boost::interprocess::shared_ptr</code> and <code>unique_ptr</code> compliance (hence the irregular capitalization). </p>

<p class="definition">Definition at line <a class="el" href="basic__blob_8hpp_source.html#l01179">1179</a> of file <a class="el" href="basic__blob_8hpp_source.html">basic_blob.hpp</a>.</p>

</div>
</div>
<a id="ad45a273758a0fc0bd81ab36edc9d8217" name="ad45a273758a0fc0bd81ab36edc9d8217"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad45a273758a0fc0bd81ab36edc9d8217">&#9670;&nbsp;</a></span>Pointer_raw</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Allocator , <a class="el" href="classbool.html">bool</a> S_SHARING_ALLOWED&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classflow_1_1util_1_1Basic__blob.html">flow::util::Basic_blob</a>&lt; Allocator, S_SHARING_ALLOWED &gt;::Deleter_raw::Pointer_raw =  typename std::allocator_traits&lt;<a class="el" href="classflow_1_1util_1_1Basic__blob.html#ae2089286c63766445b3bf40422eb17db">Allocator_raw</a>&gt;<a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a0152dc5043d6375124456f71d961988c">::pointer</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Short-hand for the allocator's pointer type, pointing to <a class="el" href="classflow_1_1util_1_1Basic__blob.html#aeb9b64885b78263048d406ec34907ecf" title="Short-hand for values, which in this case are unsigned bytes.">Basic_blob::value_type</a>. </p>
<p >This may or may not simply be <code>value_type*</code>; in cases including SHM-storing allocators without a constant cross-process vaddr scheme it needs to be a fancy-pointer type instead (e.g., <code>boost::interprocess::offset_ptr&lt;value_type&gt;</code>). </p>

<p class="definition">Definition at line <a class="el" href="basic__blob_8hpp_source.html#l01176">1176</a> of file <a class="el" href="basic__blob_8hpp_source.html">basic_blob.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a145ea5595e461bd93bd6e585a67516e6" name="a145ea5595e461bd93bd6e585a67516e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a145ea5595e461bd93bd6e585a67516e6">&#9670;&nbsp;</a></span>Deleter_raw() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Allocator , <a class="el" href="classbool.html">bool</a> S_SHARING_ALLOWED&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classflow_1_1util_1_1Basic__blob.html">flow::util::Basic_blob</a>&lt; Allocator, S_SHARING_ALLOWED &gt;::Deleter_raw::Deleter_raw</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default ctor: Must never be invoked; suitable only for a null smart-pointer. </p>
<p >Without this a <code>unique_ptr&lt;..., Deleter_Raw&gt;</code> cannot be default-cted. </p>

<p class="definition">Definition at line <a class="el" href="basic__blob_8hpp_source.html#l02481">2481</a> of file <a class="el" href="basic__blob_8hpp_source.html">basic_blob.hpp</a>.</p>

</div>
</div>
<a id="a40b06c7484a925fe7550a3437a0ad194" name="a40b06c7484a925fe7550a3437a0ad194"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40b06c7484a925fe7550a3437a0ad194">&#9670;&nbsp;</a></span>Deleter_raw() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Allocator , <a class="el" href="classbool.html">bool</a> S_SHARING_ALLOWED&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classflow_1_1util_1_1Basic__blob.html">flow::util::Basic_blob</a>&lt; Allocator, S_SHARING_ALLOWED &gt;::Deleter_raw::Deleter_raw </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classflow_1_1util_1_1Basic__blob.html#ae2089286c63766445b3bf40422eb17db">Allocator_raw</a> &amp;&#160;</td>
          <td class="paramname"><em>alloc_raw</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classflow_1_1util_1_1Basic__blob.html#af9b27f4b460a0fa8a9c9638174a9433a">size_type</a>&#160;</td>
          <td class="paramname"><em>buf_sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs deleter by memorizing the allocator (of zero size if <a class="el" href="classflow_1_1util_1_1Basic__blob.html#ae2089286c63766445b3bf40422eb17db" title="Short-hand for the allocator type specified at compile-time. Its element type is our value_type.">Allocator_raw</a> is stateless, usually) used to allocate whatever shall be passed-to <code><a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a83887b57f8a78c0224fd7563210e94ec" title="Deallocates using Allocator_raw::deallocate(), passing-in the supplied pointer (to value_type) to_del...">operator()()</a></code>; and the size (in # of <code>value_type</code>s) of the buffer allocated there. </p>
<p >The latter is required, at least technically, because <code>Allocator_raw::deallocate()</code> requires the value count, equal to that when <code>allocate()</code> was called, to be passed-in. Many allocators probably don't really need this, as array size is typically recorded invisibly near the array itself, but formally this is not guaranteed for all allocators.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">alloc_raw</td><td>Allocator to copy and store. </td></tr>
    <tr><td class="paramname">buf_sz</td><td>See above. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="basic__blob_8hpp_source.html#l02471">2471</a> of file <a class="el" href="basic__blob_8hpp_source.html">basic_blob.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a83887b57f8a78c0224fd7563210e94ec" name="a83887b57f8a78c0224fd7563210e94ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83887b57f8a78c0224fd7563210e94ec">&#9670;&nbsp;</a></span>operator()()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Allocator , <a class="el" href="classbool.html">bool</a> S_SHARING_ALLOWED&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classflow_1_1util_1_1Basic__blob.html">flow::util::Basic_blob</a>&lt; Allocator, S_SHARING_ALLOWED &gt;::Deleter_raw::operator() </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#ad45a273758a0fc0bd81ab36edc9d8217">Pointer_raw</a>&#160;</td>
          <td class="paramname"><em>to_delete</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deallocates using <code>Allocator_raw::deallocate()</code>, passing-in the supplied pointer (to <code>value_type</code>) <code>to_delete</code> and the number of <code>value_type</code>s to delete (from ctor). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">to_delete</td><td>Pointer to buffer to delete as supplied by <code>shared_ptr</code> or <code>unique_ptr</code> internals. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="basic__blob_8hpp_source.html#l02489">2489</a> of file <a class="el" href="basic__blob_8hpp_source.html">basic_blob.hpp</a>.</p>

<p class="reference">References <a class="el" href="basic__blob_8hpp_source.html#l01391">flow::util::Basic_blob&lt; Allocator, S_SHARING_ALLOWED &gt;::m_alloc_raw</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a2b946cc7c51563ef74d1d47ebfad53c2" name="a2b946cc7c51563ef74d1d47ebfad53c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b946cc7c51563ef74d1d47ebfad53c2">&#9670;&nbsp;</a></span>m_alloc_raw</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Allocator , <a class="el" href="classbool.html">bool</a> S_SHARING_ALLOWED&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::optional&lt;<a class="el" href="classflow_1_1util_1_1Basic__blob.html#ae2089286c63766445b3bf40422eb17db">Allocator_raw</a>&gt; <a class="el" href="classflow_1_1util_1_1Basic__blob.html">flow::util::Basic_blob</a>&lt; Allocator, S_SHARING_ALLOWED &gt;::Deleter_raw::m_alloc_raw</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>See ctor: the allocator that <code><a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a83887b57f8a78c0224fd7563210e94ec" title="Deallocates using Allocator_raw::deallocate(), passing-in the supplied pointer (to value_type) to_del...">operator()()</a></code> shall use to deallocate. </p>
<p >For stateless allocators this typically has size zero.</p>
<h3>What's with <code>optional&lt;&gt;</code>?</h3>
<p >...Okay, so actually this has size (whatever <code>optional</code> adds, probably a <code>bool</code>) + <code>sizeof(Allocator_raw)</code>, the latter being indeed zero for stateless allocators. Why use <code>optional&lt;&gt;</code> though? Well, we only do to support stateful allocators which cannot be default-cted; and our own default ctor requires that <a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a2b946cc7c51563ef74d1d47ebfad53c2" title="See ctor: the allocator that operator()() shall use to deallocate.">m_alloc_raw</a> is initialized to <em>something</em>... even though it (by default ctor contract) will never be accessed.</p>
<p >It is slightly annoying that we waste the extra space for <code>optional</code> internals even when <code>Allocator_raw</code> is stateless (and it is often stateless!). Plus, when <a class="el" href="classflow_1_1util_1_1Basic__blob.html#a30fe0a61f8b83e7588bdc4a88dbaabae" title="The smart-pointer type used for m_buf_ptr; a custom-allocator-and-SHM-friendly impl and parameterizat...">Buf_ptr</a> is <code>shared_ptr</code> instead of <code>unique_ptr</code> our default ctor is not even needed. Probably some meta-programming thing could be done to avoid even this overhead, but in my (ygoldfel) opinion the overhead is so minor, it does not even rise to the level of a to-do. </p>

<p class="definition">Definition at line <a class="el" href="basic__blob_8hpp_source.html#l01233">1233</a> of file <a class="el" href="basic__blob_8hpp_source.html">basic_blob.hpp</a>.</p>

</div>
</div>
<a id="a2483f07aa6cf4ddb96309c4aa2eec00d" name="a2483f07aa6cf4ddb96309c4aa2eec00d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2483f07aa6cf4ddb96309c4aa2eec00d">&#9670;&nbsp;</a></span>m_buf_sz</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Allocator , <a class="el" href="classbool.html">bool</a> S_SHARING_ALLOWED&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classflow_1_1util_1_1Basic__blob.html#af9b27f4b460a0fa8a9c9638174a9433a">size_type</a> <a class="el" href="classflow_1_1util_1_1Basic__blob.html">flow::util::Basic_blob</a>&lt; Allocator, S_SHARING_ALLOWED &gt;::Deleter_raw::m_buf_sz</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>See ctor and <a class="el" href="classflow_1_1util_1_1Basic__blob_1_1Deleter__raw.html#a83887b57f8a78c0224fd7563210e94ec" title="Deallocates using Allocator_raw::deallocate(), passing-in the supplied pointer (to value_type) to_del...">operator()()</a>: the size of the buffer to deallocate. </p>

<p class="definition">Definition at line <a class="el" href="basic__blob_8hpp_source.html#l01236">1236</a> of file <a class="el" href="basic__blob_8hpp_source.html">basic_blob.hpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>util/<a class="el" href="basic__blob_8hpp_source.html">basic_blob.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:36 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
